/*
package com.pie4cloud.pie.job.api.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.client.DefaultServiceInstance;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier;
import org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier;
import org.springframework.stereotype.Service;
import reactor.core.publisher.Flux;

import java.util.List;

@Slf4j
public class NetSegmentServiceInstanceListSupplier  extends DelegatingServiceInstanceListSupplier {
	public NetSegmentServiceInstanceListSupplier(ServiceInstanceListSupplier delegate) {
		super(delegate);
	}

	@Override
	public Flux<List<ServiceInstance>> get() {
		return getDelegate().get().map(this::filterByNetSegment);
	}
	private List<ServiceInstance> filterByNetSegment(List<ServiceInstance> instances) {
		ServiceInstance serviceInstance=new DefaultServiceInstance(null,"pie-dmz","127.0.0.1",8858,true);
		instances.add(serviceInstance);
		return instances;
	}
}
*/
